LassoScript Utility
Basics Browse Detail

[String->GetNumericValue]

Tag Link [String->GetNumericValue] Category String
Type Member Source Available No
Support Preferred Version 7.0
Change Unchanged Data Source Any
Output Type Decimal Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0

Description

[String->GetNumericValue] returns the decimal value of a specified character or -1.0 if the character is alphabetic. The character within the base string to be inspected is specified starting from 1 for the first character in the string.

Syntax

[Output: '1'->(GetNumericValue: 1)]

<?LassoScript
Variable: 'myString' = '1000';
Variable: 'Result' = $myString->(GetNumericValue: 1);
>

Parameters

Required Parameters
Position The character within the string to inspect.

Examples

To return the numeric value for a character:

Use the [String->GetNumericValue] tag. The following example returns the numeric value for the fourth character of a string.

[Output: '2001'->(GetNumericValue: 4)]

1

Related Tags

Category Tags